package com.hunau.datastructure.stackqueue;

import java.util.Deque;
import java.util.LinkedList;

public class TestConvert {

	public static void main(String[] args) {
		int n=13;
		int t=n;
		Deque stack=new LinkedList();
		do {
			int mod = t%2;
			stack.push(mod);
			int result =t/2;
			t=result;
		}while(t>0);
		System.out.print(n+"----------->");
		while(!stack.isEmpty()) {
			System.out.print(stack.pop());
		}
	}

}
